<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>单列布局-水平居中</title>
	<style type="text/css">
		/* 
		  第三种 定位 position
		  兼容性不太好
		*/
		.box {
			border: 1px solid #f00;
			width:1024px ;
			height: 200px;
			position: relative;
			left: 50%;
			margin-left: -512px;
		}
	</style>

</head>
<body>
	<div class="box"></div>
</body>
</html>